package cn.edu.neusoft.yuejian4.yuejian_4.model;

import java.util.List;

import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Activity;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Signup;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Success;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.List_TListener;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.TListener;
import retrofit2.Call;

/**
 * Created by Lix on 2018/10/10.
 */

public class ActivityModel extends  RetrofitBaseModel {

    public void allActivity(List_TListener<Activity> listener){
        Call<List<Activity>> call = service.allActivity();
        callenqueue_list(call,listener);
    }

    public void getActivity(int act_id, TListener<Activity> listener){
        Call<Activity> call = service.getActivity(act_id);
        callenqueue(call,listener);
    }
    public void isCollection(int actid, int uid, TListener<Success> listener){
        Call<Success> call = service.iscollection(actid,uid);
        callenqueue(call,listener);
    }
    public void collection(int actid, int uid, TListener<Success> listener){
        Call<Success> call = service.collection(actid,uid);
        callenqueue(call,listener);
    }
    public void unCollection(int actid, int uid, TListener<Success> listener){
        Call<Success> call = service.uncollection(actid,uid);
        callenqueue(call,listener);
    }
    public void signup(int actid,int uid,TListener<Signup> listener){
        Call<Signup> call = service.act_signup(actid,uid);
        callenqueue(call,listener);
    }
}
